package com.example.leavemanagement.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.leavemanagement.model.dto.leave.LeaveAddRequest;
import com.example.leavemanagement.model.dto.leave.LeaveQueryRequest;
import com.example.leavemanagement.model.dto.leave.LeaveReviewRequest;
import com.example.leavemanagement.model.entity.LeaveInfo;
import com.example.leavemanagement.model.entity.User;
import com.example.leavemanagement.model.vo.LeaveVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author ASUS
 * @description 针对表【leave_info(请假信息)】的数据库操作Service
 * @createDate 2025-04-28 12:20:06
 */
public interface LeaveInfoService extends IService<LeaveInfo> {

    /**
     * 添加请假信息
     * @param leaveAddRequest
     * @param request
     * @return
     */
    boolean addLeaveInfo(LeaveAddRequest leaveAddRequest, HttpServletRequest request);


    /**
     * 添加查询条件
     * @param leaveQueryRequest
     * @return
     */
    QueryWrapper<LeaveInfo> getQueryWrapper(LeaveQueryRequest leaveQueryRequest);


    /**
     * 审核请假信息
     */

    void doLeaveReview(LeaveReviewRequest leaveReviewRequest, User loginUser);


    /**
     * 查询某个用户的所有请假请假信息
     * @param
     * @param
     * @return
     */
    List<LeaveVo> getUserLeaveInfoList(User loginUser);
}
